/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SPATIAL_MGR_EVENT_HANDLER_H
#define SPATIAL_MGR_EVENT_HANDLER_H

#include <event_handler.h>
#include <refbase.h>

namespace OHOS {
namespace Msdp {
class SpatialaWarenessMgrService;

enum {
    EVENT_DEVICE_INFO_UPDATE = 0,
    EVENT_SUB_MODULE_BASE = 3000,
};

class SpatialMgrEventHandler : public AppExecFwk::EventHandler {
public:
    enum {
        DELAY_INIT_DEVICE_MANAGER = EVENT_SUB_MODULE_BASE + 500,
        EVENT_LOAD_MSDP_ALGORITHM,
        EVENT_CHECK_DEVICE_MANAGER_SERVICE,
    };
    SpatialMgrEventHandler(const std::shared_ptr<AppExecFwk::EventRunner> &runner,
        const wptr<SpatialaWarenessMgrService> &service);
    ~SpatialMgrEventHandler() = default;

    void ProcessEvent(const AppExecFwk::InnerEvent::Pointer &event) override;

private:
    wptr<SpatialaWarenessMgrService> service_;
};
} // namespace Msdp
} // namespace OHOS

#endif // THERMALSRV_EVENT_HANDLER